<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">代充物流公司信息</a></li>
			<li><a href="{:U('AdminLogistics/add_subvip',array('id'=>empty($item['id'])?'':$item['id']))}" target="_self">添加代充物流公司</a></li>
		</ul>
        <form class="well form-search" method="post" action="{:U('AdminLogistics/index_subvip')}">
            关键词：
            <input type="text" name="keyword" style="width: 200px;" value="{$keyword}" placeholder="请输入关键字...">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:U('AdminLogistics/index_subvip')}">清空</a>
        </form>
		<form class="js-ajax-form" action="" method="post">

			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
                        <th width="50">物流公司名称</th>
                        <th width="50">上级物流公司名称</th>
                        <th width="50">余额</th>
                        <th width="100">卡片总数</th>
						<th width="100">累计激活卡片数量</th>
                        <th width="50">剩余卡片数量</th>
                        <th width="50">创建时间</th>
						<th width="70">{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<foreach name="list" item="vo">
				<if condition="$vo['delete_time']">
				<tr class="deleted">
				<else />
				<tr>
				</if>
                    <td><b>{$vo.logistics_name}</b></td>
                    <td><b>{$vo.upper_logistics_name}</b></td>
                    <td>{$vo.balance}</td>
                    <td>{$vo.total_card_num}</td>
                    <td>{$vo.active_card_num}</td>
                    <td><php>echo $vo['total_card_num']-$vo['active_card_num']</php></td>
					<td>{:date("Y-m-d H:i:s",$vo['create_time'])}</td>
					<td class="undeleted">
						<if condition="$vo['delete_time']">
							<a href='{:U("AdminLogistics/overdelete",array("id"=>$vo["id"]))}'>彻底删除</a> |
							<a href='{:U("AdminLogistics/restore",array("id"=>$vo["id"]))}'>恢复数据</a>
						<else />
							<a href='{:U("AdminCard/send_vip_sub",array("id"=>$vo["id"]))}'>发卡</a> |
							<a href="{:U('AdminRecharge/add_sub',array('id'=>$vo['id']))}">充值</a> |
							<a href="{:U('AdminRefund/refund_sub',array('id'=>$vo['id']))}">退款</a> |
							<a href="{:U('AdminLogistics/add_subvip',array('id'=>$vo['id']))}">{:L('EDIT')}</a> |
							<a href="{:U('AdminLogistics/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:L('DELETE')}</a>
						</if>
					</td>
				</tr>
				</foreach>

			</table>

			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
		function refersh_window() {
			var refersh_time = getCookie('refersh_time');
			if (refersh_time == 1) {
				window.location = "{:U('AdminLogistics/index_subvip',$formget)}";
			}
		}

	</script>
</body>
</html>